﻿using Model;
using System.Windows.Controls;

namespace Zellularautomat
{
	/// <summary>
	/// Interaktionslogik für UCNumericAttribute.xaml
	/// </summary>
	public partial class UCNumericAttribute : UserControl
	{
		private string attributeName;
		public string AttributeName
		{
			get { return attributeName; }
			set { attributeName = value; }
		}

		private Cell cell;
		public double AttributeValue
		{
			get { return ((NumberAttribut)cell.Attributes[attributeName]).Value; }
			set { ((NumberAttribut)cell.Attributes[attributeName]).Value = value; }
		}

		public UCNumericAttribute(string attributeName, Cell cell)
		{
			this.attributeName = attributeName;
			this.cell = cell;
			InitializeComponent();
		}
	}
}
